package various;


import lejos.nxt.LCD;
import lejos.nxt.Motor;
import lejos.nxt.SensorPort;
import lejos.nxt.addon.ColorSensor;

public class Sposta {
	public static void main(String[] args) throws Exception {
		ColorSensor cs = new ColorSensor(SensorPort.S1);
		int[][] labirinto = new int[16][12];

		for (int i = 0; i < 16; i++) {
			for (int j = 0; j < 12; j++) {
				Motor.A.setSpeed(750);
				Motor.A.regulateSpeed(true);
				labirinto[i][j] = cs.getColorNumber();
				Motor.A.rotate(230);

			}

			Motor.A.setSpeed(750);
			Motor.A.rotate(-230 * 12);

			Motor.B.regulateSpeed(true);
			Motor.B.setSpeed(75);
			Motor.B.rotate(-30);
			Thread.sleep(250);

			if (i < 7)
				LCD.drawInt(i, 0, i);
			if (i >= 7)
				LCD.drawInt(i, 1, i % 7);
		}
	}

}
